package cn.edu.javaweb.adminServlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.edu.javaweb.service.AdminDeleBlistService;
import cn.edu.javaweb.service.AdminDeleNewsService;
import cn.edu.javaweb.utils.DBUtil;

/**
 * Servlet implementation class DeleNews
 */
@WebServlet("/DeleNews")
public class DeleNews extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
	private AdminDeleNewsService dele=new AdminDeleNewsService();
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		this.doPost(request, response);
	}


	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String id=request.getParameter("id");
		int result=dele.getDele(id);
		response.sendRedirect("/Volunteer/News");

	}

}
